package myclass;
import java.sql.*;
import bean.ConDbBean;
import java.sql.ResultSet;
import java.sql.SQLException;

import bean.ConDbBean;

public class Facility {
	private ResultSet rs;
	private ConDbBean conn;
	private String f_id="";
	private String f_name="";
	
	public Facility(){
		this.f_id="";
		this.f_name="";
	}
	public void setFacility(String fid){
		this.conn = new ConDbBean();
		String sql="select * from FACILITY WHERE F_ID='"+fid+"'";
		rs = conn.executeQuery(sql);
		try{
			rs.next();
			this.f_id=rs.getString("F_ID");
			this.f_name=rs.getString("F_NAME");
			rs.close();
		}
        catch(SQLException e) { 
            e.printStackTrace(); 
        }
	}
	public String getFName(){
		return this.f_name;
	}
}
